<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <input type="text" v-focus.a.b="100+1">
  </div>

  <!-- <div id="app2">
    <input type="text" v-focus>
  </div> -->
  <script src="lib/vue.js"></script>
  <script>
    // 自定义全局指令
    Vue.directive('focus', {
      inserted (el, binding) {
        // console.log(el);
        console.log(binding);
        el.focus();
      }
    });


    new Vue({
      el: '#app',
      data: {

      }
    });

    /* new Vue({
      el: '#app2',
      data: {}
    }) */
  </script>
</body>
</html>